# attributeChangedCallback
(name, oldValue, newValue) – Callback that is invoked when one of the {@link withProperties} changes.
# name
– Name of attribute
# oldValue
– Old value
# newValue
– New value
attributeChangedCallback(name, oldValue, newValue) =>
# connectedCallback
() – Invoked when the component is added to the document's DOM.
In connectedCallback()
you should setup tasks that should only occur when
the element is connected to the document. The most common of these is
adding event listeners to nodes external to the element, like a keydown
event handler added to the window.
connectedCallback() {
super.connectedCallback();
this.addEventListener('keydown', this._handleKeydown);
}
Typically, anything done in connectedCallback()
should be undone when the
element is disconnected, in disconnectedCallback()
.
connectedCallback() =>